<!DOCTYPE html>
<html lang="en-us">
  <head>
    
    <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Hugo 0.54.0 with theme Tranquilpeak 0.4.3-SNAPSHOT">
<meta name="author" content="Lyne (PHPer/Beatboxer)">
<meta name="keywords" content="">
<meta name="description" content="Tranquilpeak Hugo theme have its own theme to highlight source code. It&rsquo;s based on GitHub theme: simple and elegant. Check out how it sublimate source codes.">


<meta property="og:description" content="Tranquilpeak Hugo theme have its own theme to highlight source code. It&rsquo;s based on GitHub theme: simple and elegant. Check out how it sublimate source codes.">
<meta property="og:type" content="article">
<meta property="og:title" content="Js">
<meta name="twitter:title" content="Js">
<meta property="og:url" content="https://lyne007.github.io/js/">
<meta property="twitter:url" content="https://lyne007.github.io/js/">
<meta property="og:site_name" content="Lyne PHPer/Beatboxer">
<meta property="og:description" content="Tranquilpeak Hugo theme have its own theme to highlight source code. It&rsquo;s based on GitHub theme: simple and elegant. Check out how it sublimate source codes.">
<meta name="twitter:description" content="Tranquilpeak Hugo theme have its own theme to highlight source code. It&rsquo;s based on GitHub theme: simple and elegant. Check out how it sublimate source codes.">
<meta property="og:locale" content="en-us">

  
    <meta property="article:published_time" content="2019-03-14T23:53:12">
  
  
    <meta property="article:modified_time" content="2019-03-14T23:53:12">
  
  
  
    
      <meta property="article:section" content="tranquilpeak">
    
      <meta property="article:section" content="features">
    
  
  
    
      <meta property="article:tag" content="highlight code">
    
      <meta property="article:tag" content="github theme">
    
      <meta property="article:tag" content="test">
    
  


<meta name="twitter:card" content="summary">







  <meta property="og:image" content="//d1u9biwaxjngwg.cloudfront.net/highlighted-code-showcase/peak-140.jpg">
  <meta property="twitter:image" content="//d1u9biwaxjngwg.cloudfront.net/highlighted-code-showcase/peak-140.jpg">





  <meta property="og:image" content="https://www.gravatar.com/avatar/d24c9c3168cfd7614e3e929672614727?s=640">
  <meta property="twitter:image" content="https://www.gravatar.com/avatar/d24c9c3168cfd7614e3e929672614727?s=640">


    <title>Js</title>

    <link rel="icon" href="https://lyne007.github.io/favicon.png">
    

    

    <link rel="canonical" href="https://lyne007.github.io/js/">

    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.min.css" integrity="sha256-vuXZ9LGmmwtjqFX1F+EKin1ThZMub58gKULUyf0qECk=" crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/helpers/jquery.fancybox-thumbs.min.css" integrity="sha256-SEa4XYAHihTcEP1f5gARTB2K26Uk8PsndQYHQC1f4jU=" crossorigin="anonymous" />
    
    
    <link rel="stylesheet" href="https://lyne007.github.io/css/style-nnm2spxvve8onlujjlegkkytaehyadd4ksxc1hyzzq9a2wvtrgbljqyulomn.min.css" />
    
    

    
      
    
    
  </head>

  <body>
    <div id="blog">
      <header id="header" data-behavior="1">
  <i id="btn-open-sidebar" class="fa fa-lg fa-bars"></i>
  <div class="header-title">
    <a class="header-title-link" href="https://lyne007.github.io/">Lyne PHPer/Beatboxer</a>
  </div>
  
    
      <a class="header-right-picture "
         href="https://lyne007.github.io/#about">
    
    
    
      
        <img class="header-picture" src="https://www.gravatar.com/avatar/d24c9c3168cfd7614e3e929672614727?s=90" alt="Author&#39;s picture" />
      
    
    </a>
  
</header>

      <nav id="sidebar" data-behavior="1">
  <div class="sidebar-container">
    
      <div class="sidebar-profile">
        <a href="https://lyne007.github.io/#about">
          <img class="sidebar-profile-picture" src="https://www.gravatar.com/avatar/d24c9c3168cfd7614e3e929672614727?s=110" alt="Author&#39;s picture" />
        </a>
        <h4 class="sidebar-profile-name">Lyne (PHPer/Beatboxer)</h4>
        
          <h5 class="sidebar-profile-bio">我会虾B~ B~ !</h5>
        
      </div>
    
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://lyne007.github.io/">
    
      <i class="sidebar-button-icon fa fa-lg fa-home"></i>
      
      <span class="sidebar-button-desc">首页</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://lyne007.github.io/categories">
    
      <i class="sidebar-button-icon fa fa-lg fa-bookmark"></i>
      
      <span class="sidebar-button-desc">分类</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://lyne007.github.io/archives">
    
      <i class="sidebar-button-icon fa fa-lg fa-archive"></i>
      
      <span class="sidebar-button-desc">Archives</span>
    </a>
  </li>


    </ul>
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://github.com/kakawait" target="_blank" rel="noopener">
    
      <i class="sidebar-button-icon fa fa-lg fa-github"></i>
      
      <span class="sidebar-button-desc">GitHub</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://www.facebook.com/lyne007/lyne007.php?u=%25s" target="_blank" rel="noopener">
    
      <i class="sidebar-button-icon fa fa-lg fa-facebook-official"></i>
      
      <span class="sidebar-button-desc">Facebook</span>
    </a>
  </li>


    </ul>
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://lyne007.github.io/index.xml">
    
      <i class="sidebar-button-icon fa fa-lg fa-rss"></i>
      
      <span class="sidebar-button-desc">RSS</span>
    </a>
  </li>


    </ul>
  </div>
</nav>

      

      <div id="main" data-behavior="1"
        class="
               hasCoverMetaIn
               ">
        <article class="post" itemscope itemType="http://schema.org/BlogPosting">
          
          
            <div class="post-header main-content-wrap text-left">
  
    <h1 class="post-title" itemprop="headline">
      Js
    </h1>
  
  
  <div class="postShorten-meta post-meta">
    
      <time itemprop="datePublished" datetime="2019-03-14T23:53:12&#43;08:00">
        
  March 14, 2019

      </time>
    
    
  
  
    <span>in</span>
    
      <a class="category-link" href="https://lyne007.github.io/categories/tranquilpeak">tranquilpeak</a>, 
    
      <a class="category-link" href="https://lyne007.github.io/categories/features">features</a>
    
  

  </div>

</div>
          
          <div class="post-content markdown" itemprop="articleBody">
            <div class="main-content-wrap">
              <p>Tranquilpeak Hugo theme have its own theme to highlight source code. It&rsquo;s based on GitHub theme: simple and elegant. Check out how it sublimate source codes.</p>

<h1 id="table-of-contents">Table of Contents</h1><nav id="TableOfContents">
<ul>
<li><a href="#tabbed-code-block">Tabbed code block</a></li>
<li><a href="#apacheconf">ApacheConf</a></li>
<li><a href="#bash">Bash</a></li>
<li><a href="#coffeescript">Coffeescript</a></li>
<li><a href="#c">C++</a></li>
<li><a href="#cshparp">CShparp</a></li>
<li><a href="#css">CSS</a></li>
<li><a href="#diff">DIFF</a></li>
<li><a href="#http">HTTP</a></li>
<li><a href="#ini">INI</a></li>
<li><a href="#java">Java</a></li>
<li><a href="#javascript">JavaScript</a></li>
<li><a href="#json">JSON</a></li>
<li><a href="#makefile">Makefile</a></li>
<li><a href="#markdown">Markdown</a></li>
<li><a href="#nginx">Nginx</a></li>
<li><a href="#objective-c">Objective-C</a></li>
<li><a href="#perl">Perl</a></li>
<li><a href="#php">PHP</a></li>
<li><a href="#python">Python</a></li>
<li><a href="#ruby">Ruby</a></li>
<li><a href="#sql">SQL</a></li>
<li><a href="#html">HTML</a></li>
<li><a href="#puppet">Puppet</a></li>
<li><a href="#less">Less</a></li>
<li><a href="#scss">SCSS</a></li>
<li><a href="#stylus">Stylus</a></li>
<li><a href="#go">Go</a></li>
<li><a href="#swift">Swift</a></li>
</ul>
</nav>

<h1 id="tabbed-code-block">Tabbed code block</h1>



  
  
  
  
  

  
  
  
  
  

  
  
  
  
  


  
    
  
  

<figure class="codeblock codeblock--tabbed">
  <figcaption>
    
      <span>tabbed_codeblock</span>
    
    <ul class="tabs">
      
        <li class="tab active">js</li>
      
        <li class="tab ">css</li>
      
        <li class="tab ">html</li>
      
    </ul>
  </figcaption> 
  <div class="tabs-content">
    
      
      <figure class="highlight language-js" style="display: block;">   
        <table>
          <tbody>
            <tr>
              <td class="gutter">
                <pre><span>1</span><br><span>2</span><br><span>3</span><br><span>4</span><br><span>5</span><br><span>6</span><br><span>7</span><br><span>8</span><br><span>9</span><br><span>10</span><br><span>11</span><br><span>12</span><br><span>13</span><br><span>14</span><br><span>15</span><br><span>16</span><br></pre>
              </td>
              <td class="code">
                <pre class="code-highlight language-js"><code class="js">function $initHighlight(block, flags) {
  try {
    if (block.className.search(/\bno\-highlight\b/) != -1)
      return processBlock(block.function, true, 0x0F) &#43; &#39; class=&#34;&#34;&#39;;
  } catch (e) {
    /* handle exception */
    var e4x =
        &lt;div&gt;Example
            &lt;p&gt;1234&lt;/p&gt;&lt;/div&gt;;
  }
  for (var i = 0 / 2; i &lt; classes.length; i&#43;&#43;) { // &#34;0 / 2&#34; should not be parsed as regexp
    if (checkCondition(classes[i]) === undefined)
      return /\d&#43;[\s/]/g;
  }
  console.log(Array.every(classes, Boolean));
}</code></pre>
              </td>
            </tr>
          </tbody>
        </table>
      </figure>
    
      
      <figure class="highlight language-css" style="display: none;">   
        <table>
          <tbody>
            <tr>
              <td class="gutter">
                <pre><span>1</span><br><span>2</span><br><span>3</span><br><span>4</span><br><span>5</span><br><span>6</span><br><span>7</span><br><span>8</span><br><span>9</span><br><span>10</span><br><span>11</span><br><span>12</span><br><span>13</span><br><span>14</span><br><span>15</span><br><span>16</span><br><span>17</span><br><span>18</span><br><span>19</span><br><span>20</span><br><span>21</span><br><span>22</span><br><span>23</span><br><span>24</span><br><span>25</span><br></pre>
              </td>
              <td class="code">
                <pre class="code-highlight language-css"><code class="css">@media screen and (-webkit-min-device-pixel-ratio: 0) {
  body:first-of-type pre::after {
    content: &#39;highlight: &#39; attr(class);
  }
  body {
    background: linear-gradient(45deg, blue, red);
  }
}

@import url(&#39;print.css&#39;);
@page:right {
 margin: 1cm 2cm 1.3cm 4cm;
}

@font-face {
  font-family: Chunkfive; src: url(&#39;Chunkfive.otf&#39;);
}

div.text,
#content,
li[lang=ru] {
  font: Tahoma, Chunkfive, sans-serif;
  background: url(&#39;hatch.png&#39;) /* wtf? */;  color: #F0F0F0 !important;
  width: 100%;
}</code></pre>
              </td>
            </tr>
          </tbody>
        </table>
      </figure>
    
      
      <figure class="highlight language-html" style="display: none;">   
        <table>
          <tbody>
            <tr>
              <td class="gutter">
                <pre><span>1</span><br><span>2</span><br><span>3</span><br><span>4</span><br><span>5</span><br><span>6</span><br><span>7</span><br><span>8</span><br><span>9</span><br><span>10</span><br><span>11</span><br><span>12</span><br><span>13</span><br><span>14</span><br><span>15</span><br><span>16</span><br><span>17</span><br><span>18</span><br><span>19</span><br><span>20</span><br><span>21</span><br><span>22</span><br><span>23</span><br><span>24</span><br></pre>
              </td>
              <td class="code">
                <pre class="code-highlight language-html"><code class="html">&lt;?xml version=&#34;1.0&#34;?&gt;
&lt;response value=&#34;ok&#34; xml:lang=&#34;en&#34;&gt;
  &lt;text&gt;Ok&lt;/text&gt;
  &lt;comment html_allowed=&#34;true&#34;/&gt;
  &lt;ns1:description&gt;&lt;![CDATA[
  CDATA is &lt;not&gt; magical.
  ]]&gt;&lt;/ns1:description&gt;
  &lt;a&gt;&lt;/a&gt; &lt;a/&gt;
&lt;/response&gt;


&lt;!DOCTYPE html&gt;
&lt;title&gt;Title&lt;/title&gt;

&lt;style&gt;body {width: 500px;}&lt;/style&gt;

&lt;script type=&#34;application/javascript&#34;&gt;
  function $init() {return true;}
&lt;/script&gt;

&lt;body&gt;
  &lt;p checked class=&#34;title&#34; id=&#39;title&#39;&gt;Title&lt;/p&gt;
  &lt;!-- here goes the rest of the page --&gt;
&lt;/body&gt;</code></pre>
              </td>
            </tr>
          </tbody>
        </table>
      </figure>
    
  </div>
</figure>

<h1 id="apacheconf">ApacheConf</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight apacheconf language-apacheconf">
  <figcaption>
    
      <span>apache.conf</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">apache.conf</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-apacheconf"><code class="apacheconf"># rewrite`s rules for wordpress pretty url
LoadModule rewrite_module  modules/mod_rewrite.so
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [NC,L]

ExpiresActive On
ExpiresByType application/x-javascript  &#34;access plus 1 days&#34;

Order Deny,Allow
Allow from All

&lt;Location /maps/&gt;
  RewriteMap map txt:map.txt
  RewriteMap lower int:tolower
  RewriteCond %{REQUEST_URI} ^/([^/.]&#43;)\.html$ [NC]
  RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND
  RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
&lt;/Location&gt;</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="bash">Bash</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight bash language-bash">
  <figcaption>
    
      <span>test.bash</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">test.bash</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-bash"><code class="bash">#!/bin/bash

###### BEGIN CONFIG
ACCEPTED_HOSTS=&#34;/root/.hag_accepted.conf&#34;
BE_VERBOSE=false
###### END CONFIG

if [ &#34;$UID&#34; -ne 0 ]
then
 echo &#34;Superuser rights is required&#34;
 echo &#39;Printing the # sign&#39;
 exit 2
fi

if test $# -eq 0
then
elif test [ $1 == &#39;start&#39; ]
else
fi

genApacheConf(){
 if [[ &#34;$2&#34; = &#34;www&#34; ]]
 then
  full_domain=$1
 else
  full_domain=$2.$1
 fi
 host_root=&#34;${APACHE_HOME_DIR}$1/$2/$(title)&#34;
 echo -e &#34;# Host $1/$2 :&#34;
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="coffeescript">Coffeescript</h1>


  
  
  
  


<figure class="highlight coffeescript language-coffeescript">
  <figcaption>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-coffeescript"><code class="coffeescript"> ###
 Some tests
 ###
 class Animal
   constructor: (@name) -&gt;
   move: (meters) -&gt; alert @name &#43; &#34; moved &#34; &#43; meters &#43; &#34;m.&#34;

 class Snake extends Animal
   move: -&gt;
     alert &#39;Slithering...&#39;
     super 5

 number   = 42; opposite = true


 square = (x) -&gt; x * x

 range = [1..2]
 list = [1...5]

 math =
   root:   Math.sqrt
   cube:   (x) =&gt; x * square x

 race = (winner, runners...) -&gt;
   print winner, runners

 alert &#34;I knew it!&#34; if elvis?

 cubes = math.cube num for num in list

 text = &#34;&#34;&#34;
  Result
     is #{ @number }&#34;&#34;&#34;

 html = &#39;&#39;&#39;   &lt;body&gt;&lt;/body&gt;&#39;&#39;&#39;

 String::dasherize = -&gt;
   this.replace /_/g, &#34;-&#34;
 SINGERS = {Jagger: &#34;Rock&#34;, Elvis: &#34;Roll&#34;}

 t = ///
 #{ something }[a-z]
 ///

 $(&#39;.shopping_cart&#39;).bind &#39;click&#39;, (event) =&gt;
     @customer.purchase @cart

 hi = `function() {
   return [document.title, &#34;Hello JavaScript&#34;].join(&#34;: &#34;);
 }`</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="c">C++</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight cpp language-cpp">
  <figcaption>
    
      <span>archives.cpp</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.cpp</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-cpp"><code class="cpp">/*
 * Block comment
 */
#include &lt;vector&gt;

using namespace std;  // line comment
namespace foo {

  typedef struct Struct {
    int field;
  } Typedef;
  enum Enum {Foo = 1, Bar = 2};

  Typedef *globalVar;
  extern Typedef *externVar;

  template&lt;typename T, int N&gt;
  class Class {
    T n;
  public:
    void function(int paramName) {
      int *localVar = new int[1];
      this-&gt;n = N;

    label:
      printf(&#34;Formatted string %d\n\g&#34;, localVar[0]);
      printf(R&#34;**(Formatted raw-string %d\n)**&#34;, 1);
      std::cout &lt;&lt; (1 &lt;&lt; 2) &lt;&lt; std::endl;

    #define FOO(A) A
    #ifdef DEBUG
      printf(&#34;debug&#34;);
    #endif
    }
  };
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="cshparp">CShparp</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight cs language-cs">
  <figcaption>
    
      <span>archives.cs</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.cs</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-cs"><code class="cs">using System;

#pragma warning disable 414, 3021

public class Program
{
    /// &lt;summary&gt;The entry point to the program.&lt;/summary&gt;
    public static int Main(string[] args)
    {
        Console.WriteLine(&#34;Hello, World!&#34;);
        string s = @&#34;This
&#34;&#34;string&#34;&#34;
spans
multiple
lines!&#34;;
        return 0;
    }
}

async Task&lt;int&gt; AccessTheWebAsync()
{
    // ...
    string urlContents = await getStringTask;
    return urlContents.Length;
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="css">CSS</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight css language-css">
  <figcaption>
    
      <span>archives.css</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.css</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-css"><code class="css">@media screen and (-webkit-min-device-pixel-ratio: 0) {
  body:first-of-type pre::after {
    content: &#39;highlight: &#39; attr(class);
  }
  body {
    background: linear-gradient(45deg, blue, red);
  }
}

@import url(&#39;print.css&#39;);
@page:right {
 margin: 1cm 2cm 1.3cm 4cm;
}

@font-face {
  font-family: Chunkfive; src: url(&#39;Chunkfive.otf&#39;);
}

div.text,
#content,
li[lang=ru] {
  font: Tahoma, Chunkfive, sans-serif;
  background: url(&#39;hatch.png&#39;) /* wtf? */;  color: #F0F0F0 !important;
  width: 100%;
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="diff">DIFF</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight diff language-diff">
  <figcaption>
    
      <span>archives.diff</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.diff</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-diff"><code class="diff">Index: languages/ini.js
===================================================================
--- languages/ini.js    (revision 199)
&#43;&#43;&#43; languages/ini.js    (revision 200)
@@ -1,8 &#43;1,7 @@
 hljs.LANGUAGES.ini =
 {
   case_insensitive: true,
-  defaultMode:
-  {
&#43;  defaultMode: {
     contains: [&#39;comment&#39;, &#39;title&#39;, &#39;setting&#39;],
     illegal: &#39;[^\\s]&#39;
   },

*** /path/to/original timestamp
--- /path/to/new      timestamp
***************
*** 1,3 ****
--- 1,9 ----
&#43; This is an important
&#43; notice! It should
&#43; therefore be located at
&#43; the beginning of this
&#43; document!

! compress the size of the
! changes.

  It is important to spell</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="http">HTTP</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight http language-http">
  <figcaption>
    
      <span>archives.http</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.http</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-http"><code class="http">POST /task?id=1 HTTP/1.1
Host: example.org
Content-Type: application/json; charset=utf-8
Content-Length: 19

{&#34;status&#34;: &#34;ok&#34;, &#34;extended&#34;: true}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="ini">INI</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight ini language-ini">
  <figcaption>
    
      <span>archives.ini</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.ini</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-ini"><code class="ini">;Settings relating to the location and loading of the database
[Database]
ProfileDir=.
ShowProfileMgr=smart
Profile1_Name[] = &#34;\|/_-=MegaDestoyer=-_\|/&#34;
DefaultProfile=True
AutoCreate = no

[AutoExec]
use-prompt=&#34;prompt&#34;
Glob=autoexec_*.ini
AskAboutIgnoredPlugins=0</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="java">Java</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight java language-java">
  <figcaption>
    
      <span>archives.java</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.java</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-java"><code class="java">/* Block comment */
import java.util.Date;
/**
 * Doc comment here for &lt;code&gt;SomeClass&lt;/code&gt;
 * @see Math#sin(double)
 */
@Annotation (name=value)
public class SomeClass&lt;T extends Runnable&gt; { // some comment
  private T field = null;
  private double unusedField = 12345.67890;
  private UnknownType anotherString = &#34;Another\nStrin\g&#34;;
  public static int staticField = 0;

  public SomeClass(AnInterface param, int[] reassignedParam) {
    int localVar = &#34;IntelliJ&#34;; // Error, incompatible types
    System.out.println(anotherString &#43; toString() &#43; localVar);
    long time = Date.parse(&#34;1.2.3&#34;); // Method is deprecated
    int reassignedValue = this.staticField;
    reassignedValue &#43;&#43;;
    field.run();
    new SomeClass() {
      {
        int a = localVar;
      }
    };
    reassignedParam = new ArrayList&lt;String&gt;().toArray(new int[0]);
  }
}
enum AnEnum { CONST1, CONST2 }
interface AnInterface {
  int CONSTANT = 2;
  void method();
}
abstract class SomeAbstractClass {
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="javascript">JavaScript</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight js language-js">
  <figcaption>
    
      <span>archives.js</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.js</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-js"><code class="js">function $initHighlight(block, flags) {
  try {
    if (block.className.search(/\bno\-highlight\b/) != -1)
      return processBlock(block.function, true, 0x0F) &#43; &#39; class=&#34;&#34;&#39;;
  } catch (e) {
    /* handle exception */
    var e4x =
        &lt;div&gt;Example
            &lt;p&gt;1234&lt;/p&gt;&lt;/div&gt;;
  }
  for (var i = 0 / 2; i &lt; classes.length; i&#43;&#43;) { // &#34;0 / 2&#34; should not be parsed as regexp
    if (checkCondition(classes[i]) === undefined)
      return /\d&#43;[\s/]/g;
  }
  console.log(Array.every(classes, Boolean));
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="json">JSON</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight json language-json">
  <figcaption>
    
      <span>archives.json</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.json</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-json"><code class="json">[
  {
    &#34;title&#34;: &#34;apples&#34;,
    &#34;count&#34;: [12000, 20000],
    &#34;description&#34;: {&#34;text&#34;: &#34;...&#34;, &#34;sensitive&#34;: false}
  },
  {
    &#34;title&#34;: &#34;oranges&#34;,
    &#34;count&#34;: [17500, null],
    &#34;description&#34;: {&#34;text&#34;: &#34;...&#34;, &#34;sensitive&#34;: false}
  }
]</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="makefile">Makefile</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight mak language-mak">
  <figcaption>
    
      <span>archives.mak</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.mak</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-mak"><code class="mak"># Makefile

BUILDDIR      = _build
EXTRAS       ?= $(BUILDDIR)/extras

.PHONY: main clean

main:
	@echo &#34;Building main facility...&#34;
	build_main $(BUILDDIR)

clean:
	rm -rf $(BUILDDIR)/*</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="markdown">Markdown</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight md language-md">
  <figcaption>
    
      <span>archives.md</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.md</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-md"><code class="md"># hello world

you can write text [with links](http://example.com) inline or [link references][1].

* one _thing_ has *em*phasis
* two __things__ are **bold**

[1]: http://example.com

---

hello world
===========

&lt;this_is inline=&#34;xml&#34;&gt;&lt;/this_is&gt;

&gt; markdown is so cool

    so are code segments

1. one thing (yeah!)
2. two thing `i can write code`, and `more` wipee!</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="nginx">Nginx</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight nginx language-nginx">
  <figcaption>
    
      <span>archives.conf</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.conf</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-nginx"><code class="nginx">user  www www;
worker_processes  2;
pid /var/run/nginx.pid;
error_log  /var/log/nginx.error_log  debug | info | notice | warn | error | crit;

events {
    connections   2000;
    use kqueue | rtsig | epoll | /dev/poll | select | poll;
}

http {
    log_format main      &#39;$remote_addr - $remote_user [$time_local] &#39;
                         &#39;&#34;$request&#34; $status $bytes_sent &#39;
                         &#39;&#34;$http_referer&#34; &#34;$http_user_agent&#34; &#39;
                         &#39;&#34;$gzip_ratio&#34;&#39;;

    send_timeout 3m;
    client_header_buffer_size 1k;

    gzip on;
    gzip_min_length 1100;

    #lingering_time 30;

    server {
        server_name   one.example.com  www.one.example.com;
        access_log   /var/log/nginx.access_log  main;

        rewrite (.*) /index.php?page=$1 break;

        location / {
            proxy_pass         http://127.0.0.1/;
            proxy_redirect     off;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            charset            koi8-r;
        }

        location /api/ {
            fastcgi_pass 127.0.0.1:9000;
        }

        location ~* \.(jpg|jpeg|gif)$ {
            root         /spool/www;
        }
    }</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="objective-c">Objective-C</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight objectivec language-objectivec">
  <figcaption>
    
      <span>archives.m</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.m</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-objectivec"><code class="objectivec">#import &lt;UIKit/UIKit.h&gt;
#import &#34;Dependency.h&#34;

@protocol WorldDataSource
@optional
- (NSString*)worldName;
@required
- (BOOL)allowsToLive;
@end

@interface Test : NSObject &lt;HelloDelegate, WorldDataSource&gt; {
  NSString *_greeting;
}

@property (nonatomic, readonly) NSString *greeting;
- (IBAction) show;
@end

@implementation Test

@synthesize test=_test;

&#43; (id) test {
  return [self testWithGreeting:@&#34;Hello, world!\nFoo bar!&#34;];
}

&#43; (id) testWithGreeting:(NSString*)greeting {
  return [[[self alloc] initWithGreeting:greeting] autorelease];
}

- (id) initWithGreeting:(NSString*)greeting {
  if ( (self = [super init]) ) {
    _greeting = [greeting retain];
  }
  return self;
}

- (void) dealloc {
  [_greeting release];
  [super dealloc];
}

@end</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="perl">Perl</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight perl language-perl">
  <figcaption>
    
      <span>archives.perl</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.perl</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-perl"><code class="perl"># loads object
sub load
{
  my $flds = $c-&gt;db_load($id,@_) || do {
    Carp::carp &#34;Can`t load (class: $c, id: $id): &#39;$!&#39;&#34;; return undef
  };
  my $o = $c-&gt;_perl_new();
  $id12 = $id / 24 / 3600;
  $o-&gt;{&#39;ID&#39;} = $id12 &#43; 123;
  #$o-&gt;{&#39;SHCUT&#39;} = $flds-&gt;{&#39;SHCUT&#39;};
  my $p = $o-&gt;props;
  my $vt;
  $string =~ m/^sought_text$/;
  $items = split //, &#39;abc&#39;;
  $string //= &#34;bar&#34;;
  for my $key (keys %$p)
  {
    if(${$vt.&#39;::property&#39;}) {
      $o-&gt;{$key . &#39;_real&#39;} = $flds-&gt;{$key};
      tie $o-&gt;{$key}, &#39;CMSBuilder::Property&#39;, $o, $key;
    }
  }
  $o-&gt;save if delete $o-&gt;{&#39;_save_after_load&#39;};

  # GH-117
  my $g = glob(&#34;/usr/bin/*&#34;);

  return $o;
}

=head1 NAME
POD till the end of file</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="php">PHP</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight php language-php">
  <figcaption>
    
      <span>archives.php</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.php</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-php"><code class="php">&lt;?php
$heredoc = &lt;&lt;&lt; HEREDOC_ID
some $contents
HEREDOC_ID;

function foo() {
   return SomeClass::$shared;
}

// Sample comment

class SomeClass extends One implements Another {
   private $my;
   public static $shared;
   const MAGIC = 0987654321;
   /**
    * Description by &lt;a href=&#34;mailto:&#34;&gt;user@host.dom&lt;/a&gt;
    * @return SomeType
    */
   function doSmth($abc, $def) {
      foo();
      $def .=  self::MAGIC;
      $v = Helper::convert($abc . &#34;\n {$def}&#34; . $$def);
      $q = new Query( $this-&gt;invent(abs(0x80)) );
      return array($v =&gt; $q-&gt;result);
   }
}

interface Another {
}

include (dirname(__FILE__) . &#34;inc.php&#34;);
`rm -r`;

goto Label;

Label:
&lt;php_bad&gt;№&lt;/php_bad&gt;</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="python">Python</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight python language-python">
  <figcaption>
    
      <span>archives.py</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.py</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-python"><code class="python">@requires_authorization
def somefunc(param1=&#39;&#39;, param2=0):
    r&#39;&#39;&#39;A docstring&#39;&#39;&#39;
    if param1 &gt; param2: # interesting
        print &#39;Gre\&#39;ater&#39;
    return (param2 - param1 &#43; 1 &#43; 0b10l) or None

class SomeClass:
    pass

&gt;&gt;&gt; message = &#39;&#39;&#39;interpreter
... prompt&#39;&#39;&#39;</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="ruby">Ruby</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight ruby language-ruby">
  <figcaption>
    
      <span>archives.rb</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.rb</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-ruby"><code class="ruby">class A &lt; B; def self.create(object = User) object end end
class Zebra; def inspect; &#34;X#{2 &#43; self.object_id}&#34; end end

module ABC::DEF
  include Comparable

  # @param test
  # @return [String] nothing
  def foo(test)
    Thread.new do |blockvar|
      ABC::DEF.reverse(:a_symbol, :&#39;a symbol&#39;, :&lt;=&gt;, &#39;test&#39; &#43; ?\012)
      answer = valid?4 &amp;&amp; valid?CONST &amp;&amp; ?A &amp;&amp; ?A.ord
    end.join
  end

  def [](index) self[index] end
  def ==(other) other == self end
end

class Car &lt; ActiveRecord::Base
  has_many :wheels, class_name: &#39;Wheel&#39;, foreign_key: &#39;car_id&#39;
  scope :available, -&gt; { where(available: true) }
end

hash = {1 =&gt; &#39;one&#39;, 2 =&gt; &#39;two&#39;}

2.0.0p0 :001 &gt; [&#39;some&#39;]
 =&gt; [&#34;some&#34;]</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="sql">SQL</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight sql language-sql">
  <figcaption>
    
      <span>archives.sql</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.sql</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-sql"><code class="sql">BEGIN;
CREATE TABLE &#34;topic&#34; (
    -- This is the greatest table of all time
    &#34;id&#34; serial NOT NULL PRIMARY KEY,
    &#34;forum_id&#34; integer NOT NULL,
    &#34;subject&#34; varchar(255) NOT NULL -- Because nobody likes an empty subject
);
ALTER TABLE &#34;topic&#34; ADD CONSTRAINT forum_id FOREIGN KEY (&#34;forum_id&#34;) REFERENCES &#34;forum&#34; (&#34;id&#34;);

-- Initials
insert into &#34;topic&#34; (&#34;forum_id&#34;, &#34;subject&#34;) values (2, &#39;D&#39;&#39;artagnian&#39;);

select /* comment */ count(*) from cicero_forum;

-- this line lacks ; at the end to allow people to be sloppy and omit it in one-liners
/*
but who cares?
*/
COMMIT</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="html">HTML</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight xml language-xml">
  <figcaption>
    
      <span>archives.html</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.html</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-xml"><code class="xml">&lt;?xml version=&#34;1.0&#34;?&gt;
&lt;response value=&#34;ok&#34; xml:lang=&#34;en&#34;&gt;
  &lt;text&gt;Ok&lt;/text&gt;
  &lt;comment html_allowed=&#34;true&#34;/&gt;
  &lt;ns1:description&gt;&lt;![CDATA[
  CDATA is &lt;not&gt; magical.
  ]]&gt;&lt;/ns1:description&gt;
  &lt;a&gt;&lt;/a&gt; &lt;a/&gt;
&lt;/response&gt;


&lt;!DOCTYPE html&gt;
&lt;title&gt;Title&lt;/title&gt;

&lt;style&gt;body {width: 500px;}&lt;/style&gt;

&lt;script type=&#34;application/javascript&#34;&gt;
  function $init() {return true;}
&lt;/script&gt;

&lt;body&gt;
  &lt;p checked class=&#34;title&#34; id=&#39;title&#39;&gt;Title&lt;/p&gt;
  &lt;!-- here goes the rest of the page --&gt;
&lt;/body&gt;</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="puppet">Puppet</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight puppet language-puppet">
  <figcaption>
    
      <span>archives.pp</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.pp</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-puppet"><code class="puppet">class hg_punch::library {

  firewall {&#39;101 puppet library access&#39;:
    proto       =&gt; &#39;tcp&#39;,
    dport       =&gt; &#39;80&#39;,
    action      =&gt; &#39;accept&#39;,
  }

  package { &#39;git&#39;:
    ensure =&gt; present,
  }

  vcsrepo { &#34;puppet-library&#34;:
    path =&gt; &#39;/var/www/puppet-library/&#39;,
    ensure =&gt; present,
    owner =&gt; &#39;root&#39;,
    group =&gt; &#39;root&#39;,
    provider =&gt; git,
    source =&gt; &#39;https://github.com/Moliholy/puppet-library.git&#39;,
    revision =&gt; &#39;master&#39;,
    require =&gt; Package[&#39;git&#39;],
  }

  package { &#39;nfs-utils&#39;:
    ensure =&gt; present,
  }

  package { &#39;bundler&#39;:
    ensure =&gt; present,
    provider =&gt; gem,
  }

  package { [ &#34;ruby&#34;, &#34;ruby-devel&#34;, &#34;gcc&#34;, &#34;make&#34; ]:
    ensure =&gt; present,
  }

  exec { &#39;bundler update&#39;:
    command =&gt; &#34;bundler update &amp;&amp; bundler&#34;,
    cwd =&gt; &#39;/var/www/puppet-library&#39;,
    path =&gt; [&#34;/usr/bin&#34;, &#34;/bin&#34;, &#34;/usr/sbin&#34;],
    require =&gt; [ Package[&#39;ruby&#39;], Package[&#39;ruby-devel&#39;],
                Package[&#39;gcc&#39;], Package[&#39;make&#39;],
                Package[&#39;bundler&#39;], Vcsrepo[&#39;puppet-library&#39;] ]
  }

  package { &#39;mod_passenger&#39;:
    ensure =&gt; present,
  }

  file { &#34;/etc/httpd/conf.d/puppetlibrary.conf&#34;:
    owner   =&gt; root,
    group   =&gt; root,
    mode    =&gt; 0644,
    content =&gt; template(&#39;hg_punch/puppetlibrary.conf.erb&#39;),
    require =&gt; Package[&#39;mod_passenger&#39;],
    selinux_ignore_defaults =&gt; true,
  }

  file { &#34;/var/www/puppet-library/config.ru&#34;:
    owner   =&gt; root,
    group   =&gt; root,
    mode    =&gt; 0644,
    content =&gt; template(&#39;hg_punch/config.ru.erb&#39;),
    require =&gt; Vcsrepo[&#39;puppet-library&#39;],
  }

  file { [ &#39;/var/www/puppet-library/public&#39;, &#39;/var/www/puppet-library/tmp&#39; ]:
    ensure =&gt; directory,
    owner   =&gt; root,
    group   =&gt; root,
    mode =&gt; 755,
    require =&gt; Vcsrepo[&#39;puppet-library&#39;],
  }

  # Disable SELinux
  package { &#34;augeas&#34;:
    ensure =&gt; present,
  }

  augeas {&#39;disable_selinux&#39;:
    context =&gt; &#39;/files/etc/sysconfig/selinux&#39;,
    changes =&gt; &#39;set SELINUX disabled&#39;,
    lens    =&gt; &#39;shellvars.lns&#39;,
    incl     =&gt; &#39;/etc/sysconfig/selinux&#39;
  } ~&gt;
  exec {&#39;sudo disable_selinux&#39;:
    command =&gt; &#39;/bin/echo 0 &gt; /selinux/enforce&#39;,
    refreshonly =&gt; true,
  }

  service { &#34;httpd&#34;:
    enable =&gt; true,
    ensure =&gt; running,
    hasrestart =&gt; true,
    require =&gt; [ Exec[&#39;bundler update&#39;],
                File[&#39;/etc/httpd/conf.d/puppetlibrary.conf&#39;],
                File[&#39;/var/www/puppet-library/public&#39;],
                File[&#39;/var/www/puppet-library/tmp&#39;],
                Vcsrepo[&#39;puppet-library&#39;],
                Package[&#39;mod_passenger&#39;] ],
  }

}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="less">Less</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight less language-less">
  <figcaption>
    
      <span>archives.less</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.less</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-less"><code class="less">@import &#39;mixins&#39;; // external mixins

@the-border: 1px;
@base-color: #111;

#header:after {
  color: @base-color * 3;
  border-right: @the-border * 2;
}

.colored(@c) when (iscolor(@c)) {
  color: (@base-color &#43; #111) * 1.5;
}
@var: `&#34;hello&#34;.toUpperCase() &#43; &#39;!&#39;`;

@font-face {
  font-family: DroidSans;
  src: url(DroidSans.ttf);
  unicode-range: U&#43;000-5FF, U&#43;1e00-1fff, U&#43;2000-2300;
}

div &gt; p, p ~ ul, input[type=&#34;radio&#34;] {
  color: green !important;
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="scss">SCSS</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight scss language-scss">
  <figcaption>
    
      <span>archives.scss</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.scss</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-scss"><code class="scss">.btn {
    font-size:      $font-size-base;
    background:     #fff;
    width:          auto;
    height:         auto;
    border-radius:  3px;
    letter-spacing: $letter-spacing-base;
    padding:        8px 15px;
    cursor:         pointer;
    margin:         0;

    &amp;:hover,
    &amp;:focus,
    &amp;:active {
        text-decoration: none;
    }
}

// Colors variant
.btn--default {
    @include button-color-variant($font-color-light);
}
.btn--success {
    @include button-color-variant($color-success);
}
.btn--primary {
    @include button-color-variant($color-primary);
}
.btn--danger {
    @include button-color-variant($color-danger);
}

// Size variant
.btn--medium {
    @include button-size-variant($font-size-medium, 8px, 15px);
}
.btn--small {
    @include button-size-variant($font-size-small, 8px, 15px);
}

// States variant
.btn--disabled,
.btn--disabled:hover {
    color:           lighten($font-color-light, 10) !important;
    border:          1px solid lighten($font-color-light, 10);
    cursor:          not-allowed;
    text-decoration: none;
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="stylus">Stylus</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight stylus language-stylus">
  <figcaption>
    
      <span>archives.styl</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.styl</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-stylus"><code class="stylus">@import &#34;nib&#34;

// variables
$green = #008000
$green_dark = darken($green, 10)

// mixin/function
container()
  max-width 980px

// mixin/function with parameters
buttonBG($color = green)
  if $color == green
    background-color #008000
  else if $color == red
    background-color #B22222

button
  buttonBG(red)

#content, .content
  font Tahoma, Chunkfive, sans-serif
  background url(&#39;hatch.png&#39;)
  color #F0F0F0 !important
  width 100%</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="go">Go</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight go language-go">
  <figcaption>
    
      <span>archives.go</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.go</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-go"><code class="go">package main

import (
    &#34;fmt&#34;
    &#34;os&#34;
)

const (
    Sunday = iota
    numberOfDays  // this constant is not exported
)

type Foo interface {
    FooFunc(int, float32) (complex128, []int)
}

type Bar struct {
    os.File /* multi-line
               comment */
    PublicData chan int
}

func main() {
    ch := make(chan int)
    ch &lt;- 1
    x, ok := &lt;- ch
    ok = true
    float_var := 1.0e10
    defer fmt.Println(&#39;\&#39;&#39;)
    defer fmt.Println(`exitting now\`)
    var fv1 float64 = 0.75
    go println(len(&#34;hello world!&#34;))
    return
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>

<h1 id="swift">Swift</h1>


  
    
  
  
    
  
  
    
  
  
    
  


<figure class="highlight swift language-swift">
  <figcaption>
    
      <span>archives.swift</span><a href="http://underscorejs.org/#compact" target="_blank" rel="external">archives.swift</a>
    
  </figcaption>
  <table>
    <tbody>
      <tr>
        <td class="gutter">
          <pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre>
        </td>
        <td class="code">
          <pre class="code-highlight language-swift"><code class="swift">extension MyClass : Interface {
    class func unarchiveFromFile&lt;A&gt;(file : A, (Int,Int) -&gt; B) -&gt; SKNode? {
        let path: String = bundle.pathForResource(file, ofType: &#34;file\(name &#43; 5).txt&#34;)
        let funnyNumber = 3 &#43; 0xC2.15p2 * (1_000_000.000_000_1 - 000123.456) &#43; 0o21
        var sceneData = NSData.dataWithContentsOfFile(path, options: .DataReadingMappedIfSafe, error: nil)
        /* a comment /* with a nested comment */ and the end */
    }
    @objc override func shouldAutorotate() {
        return true
    }
}</code></pre>
        </td>
      </tr>
    </tbody>
  </table>
</figure>
              
            </div>
          </div>
          <div id="post-footer" class="post-footer main-content-wrap">
            
              
                
                
                  <div class="post-footer-tags">
                    <span class="text-color-light text-small">TAGGED IN</span><br/>
                    
  <a class="tag tag--primary tag--small" href="https://lyne007.github.io/tags/highlight-code/">highlight code</a>

  <a class="tag tag--primary tag--small" href="https://lyne007.github.io/tags/github-theme/">github theme</a>

  <a class="tag tag--primary tag--small" href="https://lyne007.github.io/tags/test/">test</a>

                  </div>
                
              
            
            <div class="post-actions-wrap">
  
      <nav >
        <ul class="post-actions post-action-nav">
          
            <li class="post-action">
              
                <a class="post-action-btn btn btn--disabled">
              
                  <i class="fa fa-angle-left"></i>
                  <span class="hide-xs hide-sm text-small icon-ml">NEXT</span>
                </a>
            </li>
            <li class="post-action">
              
                <a class="post-action-btn btn btn--disabled">
              
                  <span class="hide-xs hide-sm text-small icon-mr">PREVIOUS</span>
                  <i class="fa fa-angle-right"></i>
                </a>
            </li>
          
        </ul>
      </nav>
    <ul class="post-actions post-action-share" >
      
        <li class="post-action hide-lg hide-md hide-sm">
          <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions">
            <i class="fa fa-share-alt"></i>
          </a>
        </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https://lyne007.github.io/js/">
              <i class="fa fa-facebook-official"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://twitter.com/intent/tweet?text=https://lyne007.github.io/js/">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://plus.google.com/share?url=https://lyne007.github.io/js/">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        
      
      
        <li class="post-action">
          <a class="post-action-btn btn btn--default" href="#disqus_thread">
            <i class="fa fa-comment-o"></i>
          </a>
        </li>
      
      <li class="post-action">
        
          <a class="post-action-btn btn btn--default" href="#table-of-contents">
        
          <i class="fa fa-list"></i>
        </a>
      </li>
    </ul>
  
</div>

            
              
                <div id="disqus_thread">
  <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
              
            
          </div>
        </article>
        <footer id="footer" class="main-content-wrap">
  <span class="copyrights">
    &copy; 2019 Lyne (PHPer/Beatboxer). All Rights Reserved
  </span>
</footer>

      </div>
      <div id="bottom-bar" class="post-bottom-bar" data-behavior="1">
        <div class="post-actions-wrap">
  
      <nav >
        <ul class="post-actions post-action-nav">
          
            <li class="post-action">
              
                <a class="post-action-btn btn btn--disabled">
              
                  <i class="fa fa-angle-left"></i>
                  <span class="hide-xs hide-sm text-small icon-ml">NEXT</span>
                </a>
            </li>
            <li class="post-action">
              
                <a class="post-action-btn btn btn--disabled">
              
                  <span class="hide-xs hide-sm text-small icon-mr">PREVIOUS</span>
                  <i class="fa fa-angle-right"></i>
                </a>
            </li>
          
        </ul>
      </nav>
    <ul class="post-actions post-action-share" >
      
        <li class="post-action hide-lg hide-md hide-sm">
          <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions">
            <i class="fa fa-share-alt"></i>
          </a>
        </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https://lyne007.github.io/js/">
              <i class="fa fa-facebook-official"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://twitter.com/intent/tweet?text=https://lyne007.github.io/js/">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://plus.google.com/share?url=https://lyne007.github.io/js/">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        
      
      
        <li class="post-action">
          <a class="post-action-btn btn btn--default" href="#disqus_thread">
            <i class="fa fa-comment-o"></i>
          </a>
        </li>
      
      <li class="post-action">
        
          <a class="post-action-btn btn btn--default" href="#table-of-contents">
        
          <i class="fa fa-list"></i>
        </a>
      </li>
    </ul>
  
</div>

      </div>
      <div id="share-options-bar" class="share-options-bar" data-behavior="1">
  <i id="btn-close-shareoptions" class="fa fa-close"></i>
  <ul class="share-options">
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Flyne007.github.io%2Fjs%2F">
          <i class="fa fa-facebook-official"></i><span>Share on Facebook</span>
        </a>
      </li>
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://twitter.com/intent/tweet?text=https%3A%2F%2Flyne007.github.io%2Fjs%2F">
          <i class="fa fa-twitter"></i><span>Share on Twitter</span>
        </a>
      </li>
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://plus.google.com/share?url=https%3A%2F%2Flyne007.github.io%2Fjs%2F">
          <i class="fa fa-google-plus"></i><span>Share on Google&#43;</span>
        </a>
      </li>
    
  </ul>
</div>
<div id="share-options-mask" class="share-options-mask"></div>
    </div>
    
    <div id="about">
  <div id="about-card">
    <div id="about-btn-close">
      <i class="fa fa-remove"></i>
    </div>
    
      <img id="about-card-picture" src="https://www.gravatar.com/avatar/d24c9c3168cfd7614e3e929672614727?s=110" alt="Author&#39;s picture" />
    
    <h4 id="about-card-name">Lyne (PHPer/Beatboxer)</h4>
    
      <div id="about-card-bio">我会虾B~ B~ !</div>
    
    
      <div id="about-card-job">
        <i class="fa fa-briefcase"></i>
        <br/>
        CSDN, Lyne007
      </div>
    
    
      <div id="about-card-location">
        <i class="fa fa-map-marker"></i>
        <br/>
        ShangHai, CHN
      </div>
    
  </div>
</div>

    <div id="algolia-search-modal" class="modal-container">
  <div class="modal">
    <div class="modal-header">
      <span class="close-button"><i class="fa fa-close"></i></span>
      <a href="https://algolia.com" target="_blank" rel="noopener" class="searchby-algolia text-color-light link-unstyled">
        <span class="searchby-algolia-text text-color-light text-small">by</span>
        <img class="searchby-algolia-logo" src="https://www.algolia.com/static_assets/images/press/downloads/algolia-light.svg">
      </a>
      <i class="search-icon fa fa-search"></i>
      <form id="algolia-search-form">
        <input type="text" id="algolia-search-input" name="search"
          class="form-control input--large search-input" placeholder="Search" />
      </form>
    </div>
    <div class="modal-body">
      <div class="no-result text-color-light text-center">no post found</div>
      <div class="results">
        
        
      </div>
    </div>
    <div class="modal-footer">
      <p class="results-count text-medium"
         data-message-zero="no post found"
         data-message-one="1 post found"
         data-message-other="{n} posts found">
         0 posts found
      </p>
    </div>
  </div>
</div>
    
  
    
    <div id="cover" style="background-image:url('https://lyne007.github.io/images/cover.jpg');"></div>
  


    
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.7/js/jquery.fancybox.min.js" integrity="sha256-GEAnjcTqVP+vBp3SSc8bEDQqvWAZMiHyUSIorrWwH50=" crossorigin="anonymous"></script>


<script src="https://lyne007.github.io/js/script-qi9wbxp2ya2j6p7wx1i6tgavftewndznf4v0hy2gvivk1rxgc3lm7njqb6bz.min.js"></script>


<script lang="javascript">
window.onload = updateMinWidth;
window.onresize = updateMinWidth;
document.getElementById("sidebar").addEventListener("transitionend", updateMinWidth);
function updateMinWidth() {
  var sidebar = document.getElementById("sidebar");
  var main = document.getElementById("main");
  main.style.minWidth = "";
  var w1 = getComputedStyle(main).getPropertyValue("min-width");
  var w2 = getComputedStyle(sidebar).getPropertyValue("width");
  var w3 = getComputedStyle(sidebar).getPropertyValue("left");
  main.style.minWidth = `calc(${w1} - ${w2} - ${w3})`;
}
</script>

<script>
$(document).ready(function() {
  hljs.configure({ classPrefix: '', useBR: false });
  $('pre.code-highlight > code, pre > code').each(function(i, block) {
    if (!$(this).hasClass('codeblock')) {
      $(this).addClass('codeblock');
    }
    hljs.highlightBlock(block);
  });
});
</script>


  
    
      <script>
        var disqus_config = function () {
          this.page.url = 'https:\/\/lyne007.github.io\/js\/';
          
            this.page.identifier = '\/js\/'
          
        };
        (function() {
          
          
          if (window.location.hostname == "localhost") {
            return;
          }
          var d = document, s = d.createElement('script');
          var disqus_shortname = 'Lyne PHPer\/Beatboxer';
          s.src = '//' + disqus_shortname + '.disqus.com/embed.js';

          s.setAttribute('data-timestamp', +new Date());
          (d.head || d.body).appendChild(s);
        })();
      </script>
    
  




    
  </body>
</html>

